import {findTalkIndex} from "@/utils/talk";

export function clickTab(index_name) {
    console.log('切换聊天栏目',index_name)
    let index = findTalkIndex(index_name)
    if (index == -1) return

    let item = this.talks[index]
    let friend_id = item.friendId
    let friendName = item.friendName
    let friendState = item.friendState
    this.params = {
        friend_id: friend_id,
        friendState: friendState,
        friendName: friendName,
    }

    this.$store.commit('UPDATE_DIALOGUE_MESSAGE', {
        friend_id,
        friendState,
        friendName,
    })
}